package org.budo.support.google.code.kaptcha.config.factory;

import java.util.Properties;

import org.springframework.beans.factory.FactoryBean;

import com.google.code.kaptcha.util.Config;

import lombok.Getter;
import lombok.Setter;

/**
 * @author lmw
 */
@Getter
@Setter
public class KaptchaConfigFactoryBean implements FactoryBean<Config> {
    private Properties properties=new Properties();

    @Override
    public Config getObject() throws Exception {
        Properties properties = this.getProperties();
        return new Config(properties);
    }

    @Override
    public Class<?> getObjectType() {
        return Config.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
